<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- /fasttmp/mkdist-qt-4.3.5-1211793125/qtopia-core-opensource-src-4.3.5/src/corelib/tools/qrect.cpp -->
<head>
  <title>Qt 4.3: QRectF Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
<td align="right" valign="top" width="230"><a href="http://www.trolltech.com"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></a></td></tr></table><h1 align="center">QRectF Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1>
<p>The QRectF class defines a rectangle in the plane using floating point precision. <a href="#details">More...</a></p>
<pre> #include &lt;QRectF&gt;</pre><ul>
<li><a href="qrectf-members.html">List of all members, including inherited members</a></li>
<li><a href="qrectf-obsolete.html">Obsolete members</a></li>
</ul>
<a name="public-functions"></a>
<h3>Public Functions</h3>
<ul>
<li><div class="fn"/><b><a href="qrectf.html#QRectF">QRectF</a></b> ()</li>
<li><div class="fn"/><b><a href="qrectf.html#QRectF-2">QRectF</a></b> ( const QPointF &amp; <i>topLeft</i>, const QSizeF &amp; <i>size</i> )</li>
<li><div class="fn"/><b><a href="qrectf.html#QRectF-3">QRectF</a></b> ( const QPointF &amp; <i>topLeft</i>, const QPointF &amp; <i>bottomRight</i> )</li>
<li><div class="fn"/><b><a href="qrectf.html#QRectF-4">QRectF</a></b> ( qreal <i>x</i>, qreal <i>y</i>, qreal <i>width</i>, qreal <i>height</i> )</li>
<li><div class="fn"/><b><a href="qrectf.html#QRectF-5">QRectF</a></b> ( const QRect &amp; <i>rectangle</i> )</li>
<li><div class="fn"/>void <b><a href="qrectf.html#adjust">adjust</a></b> ( qreal <i>dx1</i>, qreal <i>dy1</i>, qreal <i>dx2</i>, qreal <i>dy2</i> )</li>
<li><div class="fn"/>QRectF <b><a href="qrectf.html#adjusted">adjusted</a></b> ( qreal <i>dx1</i>, qreal <i>dy1</i>, qreal <i>dx2</i>, qreal <i>dy2</i> ) const</li>
<li><div class="fn"/>qreal <b><a href="qrectf.html#bottom">bottom</a></b> () const</li>
<li><div class="fn"/>QPointF <b><a href="qrectf.html#bottomLeft">bottomLeft</a></b> () const</li>
<li><div class="fn"/>QPointF <b><a href="qrectf.html#bottomRight">bottomRight</a></b> () const</li>
<li><div class="fn"/>QPointF <b><a href="qrectf.html#center">center</a></b> () const</li>
<li><div class="fn"/>bool <b><a href="qrectf.html#contains">contains</a></b> ( const QPointF &amp; <i>point</i> ) const</li>
<li><div class="fn"/>bool <b><a href="qrectf.html#contains-2">contains</a></b> ( qreal <i>x</i>, qreal <i>y</i> ) const</li>
<li><div class="fn"/>bool <b><a href="qrectf.html#contains-3">contains</a></b> ( const QRectF &amp; <i>rectangle</i> ) const</li>
<li><div class="fn"/>void <b><a href="qrectf.html#getCoords">getCoords</a></b> ( qreal * <i>x1</i>, qreal * <i>y1</i>, qreal * <i>x2</i>, qreal * <i>y2</i> ) const</li>
<li><div class="fn"/>void <b><a href="qrectf.html#getRect">getRect</a></b> ( qreal * <i>x</i>, qreal * <i>y</i>, qreal * <i>width</i>, qreal * <i>height</i> ) const</li>
<li><div class="fn"/>qreal <b><a href="qrectf.html#height">height</a></b> () const</li>
<li><div class="fn"/>QRectF <b><a href="qrectf.html#intersected">intersected</a></b> ( const QRectF &amp; <i>rectangle</i> ) const</li>
<li><div class="fn"/>bool <b><a href="qrectf.html#intersects">intersects</a></b> ( const QRectF &amp; <i>rectangle</i> ) const</li>
<li><div class="fn"/>bool <b><a href="qrectf.html#isEmpty">isEmpty</a></b> () const</li>
<li><div class="fn"/>bool <b><a href="qrectf.html#isNull">isNull</a></b> () const</li>
<li><div class="fn"/>bool <b><a href="qrectf.html#isValid">isValid</a></b> () const</li>
<li><div class="fn"/>qreal <b><a href="qrectf.html#left">left</a></b> () const</li>
<li><div class="fn"/>void <b><a href="qrectf.html#moveBottom">moveBottom</a></b> ( qreal <i>y</i> )</li>
<li><div class="fn"/>void <b><a href="qrectf.html#moveBottomLeft">moveBottomLeft</a></b> ( const QPointF &amp; <i>position</i> )</li>
<li><div class="fn"/>void <b><a href="qrectf.html#moveBottomRight">moveBottomRight</a></b> ( const QPointF &amp; <i>position</i> )</li>
<li><div class="fn"/>void <b><a href="qrectf.html#moveCenter">moveCenter</a></b> ( const QPointF &amp; <i>position</i> )</li>
<li><div class="fn"/>void <b><a href="qrectf.html#moveLeft">moveLeft</a></b> ( qreal <i>x</i> )</li>
<li><div class="fn"/>void <b><a href="qrectf.html#moveRight">moveRight</a></b> ( qreal <i>x</i> )</li>
<li><div class="fn"/>void <b><a href="qrectf.html#moveTo">moveTo</a></b> ( qreal <i>x</i>, qreal <i>y</i> )</li>
<li><div class="fn"/>void <b><a href="qrectf.html#moveTo-2">moveTo</a></b> ( const QPointF &amp; <i>position</i> )</li>
<li><div class="fn"/>void <b><a href="qrectf.html#moveTop">moveTop</a></b> ( qreal <i>y</i> )</li>
<li><div class="fn"/>void <b><a href="qrectf.html#moveTopLeft">moveTopLeft</a></b> ( const QPointF &amp; <i>position</i> )</li>
<li><div class="fn"/>void <b><a href="qrectf.html#moveTopRight">moveTopRight</a></b> ( const QPointF &amp; <i>position</i> )</li>
<li><div class="fn"/>QRectF <b><a href="qrectf.html#normalized">normalized</a></b> () const</li>
<li><div class="fn"/>qreal <b><a href="qrectf.html#right">right</a></b> () const</li>
<li><div class="fn"/>void <b><a href="qrectf.html#setBottom">setBottom</a></b> ( qreal <i>y</i> )</li>
<li><div class="fn"/>void <b><a href="qrectf.html#setBottomLeft">setBottomLeft</a></b> ( const QPointF &amp; <i>position</i> )</li>
<li><div class="fn"/>void <b><a href="qrectf.html#setBottomRight">setBottomRight</a></b> ( const QPointF &amp; <i>position</i> )</li>
<li><div class="fn"/>void <b><a href="qrectf.html#setCoords">setCoords</a></b> ( qreal <i>x1</i>, qreal <i>y1</i>, qreal <i>x2</i>, qreal <i>y2</i> )</li>
<li><div class="fn"/>void <b><a href="qrectf.html#setHeight">setHeight</a></b> ( qreal <i>height</i> )</li>
<li><div class="fn"/>void <b><a href="qrectf.html#setLeft">setLeft</a></b> ( qreal <i>x</i> )</li>
<li><div class="fn"/>void <b><a href="qrectf.html#setRect">setRect</a></b> ( qreal <i>x</i>, qreal <i>y</i>, qreal <i>width</i>, qreal <i>height</i> )</li>
<li><div class="fn"/>void <b><a href="qrectf.html#setRight">setRight</a></b> ( qreal <i>x</i> )</li>
<li><div class="fn"/>void <b><a href="qrectf.html#setSize">setSize</a></b> ( const QSizeF &amp; <i>size</i> )</li>
<li><div class="fn"/>void <b><a href="qrectf.html#setTop">setTop</a></b> ( qreal <i>y</i> )</li>
<li><div class="fn"/>void <b><a href="qrectf.html#setTopLeft">setTopLeft</a></b> ( const QPointF &amp; <i>position</i> )</li>
<li><div class="fn"/>void <b><a href="qrectf.html#setTopRight">setTopRight</a></b> ( const QPointF &amp; <i>position</i> )</li>
<li><div class="fn"/>void <b><a href="qrectf.html#setWidth">setWidth</a></b> ( qreal <i>width</i> )</li>
<li><div class="fn"/>void <b><a href="qrectf.html#setX">setX</a></b> ( qreal <i>x</i> )</li>
<li><div class="fn"/>void <b><a href="qrectf.html#setY">setY</a></b> ( qreal <i>y</i> )</li>
<li><div class="fn"/>QSizeF <b><a href="qrectf.html#size">size</a></b> () const</li>
<li><div class="fn"/>QRect <b><a href="qrectf.html#toAlignedRect">toAlignedRect</a></b> () const</li>
<li><div class="fn"/>QRect <b><a href="qrectf.html#toRect">toRect</a></b> () const</li>
<li><div class="fn"/>qreal <b><a href="qrectf.html#top">top</a></b> () const</li>
<li><div class="fn"/>QPointF <b><a href="qrectf.html#topLeft">topLeft</a></b> () const</li>
<li><div class="fn"/>QPointF <b><a href="qrectf.html#topRight">topRight</a></b> () const</li>
<li><div class="fn"/>void <b><a href="qrectf.html#translate">translate</a></b> ( qreal <i>dx</i>, qreal <i>dy</i> )</li>
<li><div class="fn"/>void <b><a href="qrectf.html#translate-2">translate</a></b> ( const QPointF &amp; <i>offset</i> )</li>
<li><div class="fn"/>QRectF <b><a href="qrectf.html#translated">translated</a></b> ( qreal <i>dx</i>, qreal <i>dy</i> ) const</li>
<li><div class="fn"/>QRectF <b><a href="qrectf.html#translated-2">translated</a></b> ( const QPointF &amp; <i>offset</i> ) const</li>
<li><div class="fn"/>QRectF <b><a href="qrectf.html#united">united</a></b> ( const QRectF &amp; <i>rectangle</i> ) const</li>
<li><div class="fn"/>qreal <b><a href="qrectf.html#width">width</a></b> () const</li>
<li><div class="fn"/>qreal <b><a href="qrectf.html#x">x</a></b> () const</li>
<li><div class="fn"/>qreal <b><a href="qrectf.html#y">y</a></b> () const</li>
<li><div class="fn"/>QRectF <b><a href="qrectf.html#operator-and">operator&amp;</a></b> ( const QRectF &amp; <i>rectangle</i> ) const</li>
<li><div class="fn"/>QRectF &amp; <b><a href="qrectf.html#operator-and-eq">operator&amp;=</a></b> ( const QRectF &amp; <i>rectangle</i> )</li>
<li><div class="fn"/>QRectF <b><a href="qrectf.html#operator-7c">operator|</a></b> ( const QRectF &amp; <i>rectangle</i> ) const</li>
<li><div class="fn"/>QRectF &amp; <b><a href="qrectf.html#operator-7c-eq">operator|=</a></b> ( const QRectF &amp; <i>rectangle</i> )</li>
</ul>
<a name="related-non-members"></a>
<h3>Related Non-Members</h3>
<ul>
<li><div class="fn"/>Q_CORE_EXPORT_INLINE <b><a href="qrectf.html#operator-not-eq-17">operator!=</a></b> ( const QRectF &amp; <i>r1</i>, const QRectF &amp; <i>r2</i> )</li>
<li><div class="fn"/>QDataStream &amp; <b><a href="qrectf.html#operator-lt-lt-49">operator&lt;&lt;</a></b> ( QDataStream &amp; <i>stream</i>, const QRectF &amp; <i>rectangle</i> )</li>
<li><div class="fn"/>Q_CORE_EXPORT_INLINE <b><a href="qrectf.html#operator-eq-eq-26">operator==</a></b> ( const QRectF &amp; <i>r1</i>, const QRectF &amp; <i>r2</i> )</li>
<li><div class="fn"/>QDataStream &amp; <b><a href="qrectf.html#operator-gt-gt-29">operator&gt;&gt;</a></b> ( QDataStream &amp; <i>stream</i>, QRectF &amp; <i>rectangle</i> )</li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QRectF class defines a rectangle in the plane using floating point precision.</p>
<p>A rectangle is normally expressed as an upper-left corner and a size. The size (width and height) of a QRectF is always equivalent to the mathematical rectangle that forms the basis for its rendering.</p>
<p>A QRectF can be constructed with a set of left, top, width and height integers, or from a <a href="qpoint.html">QPoint</a> and a <a href="qsize.html">QSize</a>. The following code creates two identical rectangles.</p>
<pre> QRectF r1(100, 200, 11, 16);
 QRectF r2(QPoint(100, 200), QSize(11, 16));</pre>
<p>There is also a third constructor creating a QRectF from a <a href="qrect.html">QRect</a>, and a corresponding <a href="qrectf.html#toRect">toRect</a>() function that returns a <a href="qrect.html">QRect</a> object based on the values of this rectangle (note that the coordinates in the returned rectangle are rounded to the nearest integer).</p>
<p>The QRectF class provides a collection of functions that return the various rectangle coordinates, and enable manipulation of these. QRectF also provide functions to move the rectangle relative to the various coordinates. In addition there is a <a href="qrectf.html#moveTo">moveTo</a>() function that moves the rectangle, leaving its top left corner at the given coordinates. Alternatively, the <a href="qrectf.html#translate">translate</a>() function moves the rectangle the given offset relative to the current position, and the <a href="qrectf.html#translated">translated</a>() function returns a translated copy of this rectangle.</p>
<p>The <a href="qrectf.html#size">size</a>() function returns the rectange's dimensions as a <a href="qsize.html">QSize</a>. The dimensions can also be retrieved separately using the <a href="qrectf.html#width">width</a>() and <a href="qrectf.html#height">height</a>() functions. To manipulate the dimensions use the <a href="qrectf.html#setSize">setSize</a>(), <a href="qrectf.html#setWidth">setWidth</a>() or <a href="qrectf.html#setHeight">setHeight</a>() functions. Alternatively, the size can be changed by applying either of the functions setting the rectangle coordinates, for example, <a href="qrectf.html#setBottom">setBottom</a>() or <a href="qrectf.html#setRight">setRight</a>().</p>
<p>The <a href="qrectf.html#contains">contains</a>() function tells whether a given point is inside the rectangle or not, and the <a href="qrectf.html#intersects">intersects</a>() function returns true if this rectangle intersects with a given rectangle (otherwise false). The QRectF class also provides the <a href="qrectf.html#intersected">intersected</a>() function which returns the intersection rectangle, and the <a href="qrectf.html#united">united</a>() function which returns the rectangle that encloses the given rectangle and this:</p>
<p><table align="center" cellpadding="2" cellspacing="1" border="0">
<tr valign="top" class="odd"><td><img src="images/qrect-intersect.png" /></td><td><img src="images/qrect-unite.png" /></td></tr>
<tr valign="top" class="even"><td><a href="qrectf.html#intersected">intersected</a>()</td><td><a href="qrectf.html#united">united</a>()</td></tr>
</table></p>
<p>The <a href="qrectf.html#isEmpty">isEmpty</a>() function returns true if the rectangle's width or height is less than, or equal to, 0. Note that an empty rectangle is not valid: The <a href="qrectf.html#isValid">isValid</a>() function returns true if both width and height is larger than 0. A null rectangle (<a href="qrectf.html#isNull">isNull</a>() == true) on the other hand, has both width and height set to 0.</p>
<p>Note that due to the way <a href="qrect.html">QRect</a> and QRectF are defined, an empty QRectF is defined in essentially the same way as <a href="qrect.html">QRect</a>.</p>
<p>Finally, QRectF objects can be streamed as well as compared.</p>
<ul><li><a href="#rendering">Rendering</a></li>
<li><a href="#coordinates">Coordinates</a></li>
</ul>
<a name="rendering"></a>
<h3>Rendering</h3>
<p>When using an <a href="qpainter.html#RenderHint-enum">anti-aliased</a> painter, the boundary line of a QRectF will be rendered symmetrically on both sides of the mathematical rectangle's boundary line. But when using an aliased painter (the default) other rules apply.</p>
<p>Then, when rendering with a one pixel wide pen the QRectF's boundary line will be rendered to the right and below the mathematical rectangle's boundary line.</p>
<p>When rendering with a two pixels wide pen the boundary line will be split in the middle by the mathematical rectangle. This will be the case whenever the pen is set to an even number of pixels, while rendering with a pen with an odd number of pixels, the spare pixel will be rendered to the right and below the mathematical rectangle as in the one pixel case.</p>
<p><table align="center" cellpadding="2" cellspacing="1" border="0">
<tr valign="top" class="odd"><td><img src="images/qrect-diagram-zero.png" /></td><td><img src="images/qrectf-diagram-one.png" /></td></tr>
<tr valign="top" class="even"><td>Logical representation</td><td>One pixel wide pen</td></tr>
<tr valign="top" class="odd"><td><img src="images/qrectf-diagram-two.png" /></td><td><img src="images/qrectf-diagram-three.png" /></td></tr>
<tr valign="top" class="even"><td>Two pixel wide pen</td><td>Three pixel wide pen</td></tr>
</table></p>
<a name="coordinates"></a>
<h3>Coordinates</h3>
<p>The QRectF class provides a collection of functions that return the various rectangle coordinates, and enable manipulation of these. QRectF also provide functions to move the rectangle relative to the various coordinates.</p>
<p>For example: the <a href="qrectf.html#bottom">bottom</a>(), <a href="qrectf.html#setBottom">setBottom</a>() and <a href="qrectf.html#moveBottom">moveBottom</a>() functions: <a href="qrectf.html#bottom">bottom</a>() returns the y-coordinate of the rectangle's bottom edge, <a href="qrectf.html#setBottom">setBottom</a>() sets the bottom edge of the rectangle to the given y coordinate (it may change the height, but will never change the rectangle's top edge) and <a href="qrectf.html#moveBottom">moveBottom</a>() moves the entire rectangle vertically, leaving the rectangle's bottom edge at the given y coordinate and its size unchanged.</p>
<p align="center"><img src="images/qrectf-coordinates.png" /></p><p>It is also possible to add offsets to this rectangle's coordinates using the <a href="qrectf.html#adjust">adjust</a>() function, as well as retrieve a new rectangle based on adjustments of the original one using the <a href="qrectf.html#adjusted">adjusted</a>() function. If either of the width and height is negative, use the <a href="qrectf.html#normalized">normalized</a>() function to retrieve a rectangle where the corners are swapped.</p>
<p>In addition, QRectF provides the <a href="qrectf.html#getCoords">getCoords</a>() function which extracts the position of the rectangle's top-left and bottom-right corner, and the <a href="qrectf.html#getRect">getRect</a>() function which extracts the rectangle's top-left corner, width and height. Use the <a href="qrectf.html#setCoords">setCoords</a>() and <a href="qrectf.html#setRect">setRect</a>() function to manipulate the rectangle's coordinates and dimensions in one go.</p>
<p>See also <a href="qrect.html">QRect</a> and <a href="qregion.html">QRegion</a>.</p>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QRectF"></a>QRectF::QRectF ()</h3>
<p>Constructs a null rectangle.</p>
<p>See also <a href="qrectf.html#isNull">isNull</a>().</p>
<h3 class="fn"><a name="QRectF-2"></a>QRectF::QRectF ( const <a href="qpointf.html">QPointF</a> &amp; <i>topLeft</i>, const <a href="qsizef.html">QSizeF</a> &amp; <i>size</i> )</h3>
<p>Constructs a rectangle with the given <i>topLeft</i> corner and the given <i>size</i>.</p>
<p>See also <a href="qrectf.html#setTopLeft">setTopLeft</a>() and <a href="qrectf.html#setSize">setSize</a>().</p>
<h3 class="fn"><a name="QRectF-3"></a>QRectF::QRectF ( const <a href="qpointf.html">QPointF</a> &amp; <i>topLeft</i>, const <a href="qpointf.html">QPointF</a> &amp; <i>bottomRight</i> )</h3>
<p>Constructs a rectangle with the given <i>topLeft</i> and <i>bottomRight</i> corners.</p>
<p>This function was introduced in Qt 4.3.</p>
<p>See also <a href="qrectf.html#setTopLeft">setTopLeft</a>() and <a href="qrectf.html#setBottomRight">setBottomRight</a>().</p>
<h3 class="fn"><a name="QRectF-4"></a>QRectF::QRectF ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>width</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>height</i> )</h3>
<p>Constructs a rectangle with (<i>x</i>, <i>y</i>) as its top-left corner and the given <i>width</i> and <i>height</i>.</p>
<p>See also <a href="qrectf.html#setRect">setRect</a>().</p>
<h3 class="fn"><a name="QRectF-5"></a>QRectF::QRectF ( const <a href="qrect.html">QRect</a> &amp; <i>rectangle</i> )</h3>
<p>Constructs a <a href="qrectf.html">QRectF</a> rectangle from the given <a href="qrect.html">QRect</a> <i>rectangle</i>.</p>
<p>See also <a href="qrectf.html#toRect">toRect</a>().</p>
<h3 class="fn"><a name="adjust"></a>void QRectF::adjust ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>dx1</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>dy1</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>dx2</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>dy2</i> )</h3>
<p>Adds <i>dx1</i>, <i>dy1</i>, <i>dx2</i> and <i>dy2</i> respectively to the existing coordinates of the rectangle.</p>
<p>See also <a href="qrectf.html#adjusted">adjusted</a>() and <a href="qrectf.html#setRect">setRect</a>().</p>
<h3 class="fn"><a name="adjusted"></a>QRectF QRectF::adjusted ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>dx1</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>dy1</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>dx2</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>dy2</i> ) const</h3>
<p>Returns a new rectangle with <i>dx1</i>, <i>dy1</i>, <i>dx2</i> and <i>dy2</i> added respectively to the existing coordinates of this rectangle.</p>
<p>See also <a href="qrectf.html#adjust">adjust</a>().</p>
<h3 class="fn"><a name="bottom"></a><a href="qtglobal.html#qreal-typedef">qreal</a> QRectF::bottom () const</h3>
<p>Returns the y-coordinate of the rectangle's bottom edge.</p>
<p>See also <a href="qrectf.html#setBottom">setBottom</a>(), <a href="qrectf.html#bottomLeft">bottomLeft</a>(), and <a href="qrectf.html#bottomRight">bottomRight</a>().</p>
<h3 class="fn"><a name="bottomLeft"></a><a href="qpointf.html">QPointF</a> QRectF::bottomLeft () const</h3>
<p>Returns the position of the rectangle's bottom-left corner.</p>
<p>See also <a href="qrectf.html#setBottomLeft">setBottomLeft</a>(), <a href="qrectf.html#bottom">bottom</a>(), and <a href="qrectf.html#left">left</a>().</p>
<h3 class="fn"><a name="bottomRight"></a><a href="qpointf.html">QPointF</a> QRectF::bottomRight () const</h3>
<p>Returns the position of the rectangle's bottom-right corner.</p>
<p>See also <a href="qrectf.html#setBottomRight">setBottomRight</a>(), <a href="qrectf.html#bottom">bottom</a>(), and <a href="qrectf.html#right">right</a>().</p>
<h3 class="fn"><a name="center"></a><a href="qpointf.html">QPointF</a> QRectF::center () const</h3>
<p>Returns the center point of the rectangle.</p>
<p>See also <a href="qrectf.html#moveCenter">moveCenter</a>().</p>
<h3 class="fn"><a name="contains"></a>bool QRectF::contains ( const <a href="qpointf.html">QPointF</a> &amp; <i>point</i> ) const</h3>
<p>Returns true if the given <i>point</i> is inside or on the edge of the rectangle; otherwise returns false.</p>
<p>See also <a href="qrectf.html#intersects">intersects</a>().</p>
<h3 class="fn"><a name="contains-2"></a>bool QRectF::contains ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i> ) const</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>Returns true if the point (<i>x</i>, <i>y</i>) is inside or on the edge of the rectangle; otherwise returns false.</p>
<h3 class="fn"><a name="contains-3"></a>bool QRectF::contains ( const QRectF &amp; <i>rectangle</i> ) const</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>Returns true if the given <i>rectangle</i> is inside this rectangle; otherwise returns false.</p>
<h3 class="fn"><a name="getCoords"></a>void QRectF::getCoords ( <a href="qtglobal.html#qreal-typedef">qreal</a> * <i>x1</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> * <i>y1</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> * <i>x2</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> * <i>y2</i> ) const</h3>
<p>Extracts the position of the rectangle's top-left corner to *<i>x1</i> and *<i>y1</i>, and the position of the bottom-right corner to *<i>x2</i> and *<i>y2</i>.</p>
<p>See also <a href="qrectf.html#setCoords">setCoords</a>() and <a href="qrectf.html#getRect">getRect</a>().</p>
<h3 class="fn"><a name="getRect"></a>void QRectF::getRect ( <a href="qtglobal.html#qreal-typedef">qreal</a> * <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> * <i>y</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> * <i>width</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> * <i>height</i> ) const</h3>
<p>Extracts the position of the rectangle's top-left corner to *<i>x</i> and *<i>y</i>, and its dimensions to *<i>width</i> and *<i>height</i>.</p>
<p>See also <a href="qrectf.html#setRect">setRect</a>() and <a href="qrectf.html#getCoords">getCoords</a>().</p>
<h3 class="fn"><a name="height"></a><a href="qtglobal.html#qreal-typedef">qreal</a> QRectF::height () const</h3>
<p>Returns the height of the rectangle.</p>
<p>See also <a href="qrectf.html#setHeight">setHeight</a>(), <a href="qrectf.html#width">width</a>(), and <a href="qrectf.html#size">size</a>().</p>
<h3 class="fn"><a name="intersected"></a>QRectF QRectF::intersected ( const QRectF &amp; <i>rectangle</i> ) const</h3>
<p>Returns the intersection of this rectangle and the given <i>rectangle</i>. Note that <tt>r.intersected(s)</tt> is equivalent to <tt>r &amp; s</tt>.</p>
<p align="center"><img src="images/qrect-intersect.png" /></p><p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qrectf.html#intersects">intersects</a>(), <a href="qrectf.html#united">united</a>(), and <a href="qrectf.html#operator-and-eq">operator&amp;=</a>().</p>
<h3 class="fn"><a name="intersects"></a>bool QRectF::intersects ( const QRectF &amp; <i>rectangle</i> ) const</h3>
<p>Returns true if this rectangle intersects with the given <i>rectangle</i> (i.e&#x2e; there is a non-empty area of overlap between them), otherwise returns false.</p>
<p>The intersection rectangle can be retrieved using the <a href="qrectf.html#intersected">intersected</a>() function.</p>
<p>See also <a href="qrectf.html#contains">contains</a>().</p>
<h3 class="fn"><a name="isEmpty"></a>bool QRectF::isEmpty () const</h3>
<p>Returns true if the rectangle is empty, otherwise returns false.</p>
<p>An empty rectangle has <a href="qrectf.html#width">width</a>() &lt;= 0 or <a href="qrectf.html#height">height</a>() &lt;= 0. An empty rectangle is not valid (i.e&#x2e;, isEmpty() == !<a href="qrectf.html#isValid">isValid</a>()).</p>
<p>Use the <a href="qrectf.html#normalized">normalized</a>() function to retrieve a rectangle where the corners are swapped.</p>
<p>See also <a href="qrectf.html#isNull">isNull</a>(), <a href="qrectf.html#isValid">isValid</a>(), and <a href="qrectf.html#normalized">normalized</a>().</p>
<h3 class="fn"><a name="isNull"></a>bool QRectF::isNull () const</h3>
<p>Returns true if the rectangle is a null rectangle, otherwise returns false.</p>
<p>A null rectangle has both the width and the height set to 0. A null rectangle is also empty, and hence not valid.</p>
<p>See also <a href="qrectf.html#isEmpty">isEmpty</a>() and <a href="qrectf.html#isValid">isValid</a>().</p>
<h3 class="fn"><a name="isValid"></a>bool QRectF::isValid () const</h3>
<p>Returns true if the rectangle is valid, otherwise returns false.</p>
<p>A valid rectangle has a <a href="qrectf.html#width">width</a>() &gt; 0 and <a href="qrectf.html#height">height</a>() &gt; 0. Note that non-trivial operations like intersections are not defined for invalid rectangles. A valid rectangle is not empty (i.e&#x2e;, isValid() == !<a href="qrectf.html#isEmpty">isEmpty</a>()).</p>
<p>See also <a href="qrectf.html#isNull">isNull</a>(), <a href="qrectf.html#isEmpty">isEmpty</a>(), and <a href="qrectf.html#normalized">normalized</a>().</p>
<h3 class="fn"><a name="left"></a><a href="qtglobal.html#qreal-typedef">qreal</a> QRectF::left () const</h3>
<p>Returns the x-coordinate of the rectangle's left edge. Equivalent to <a href="qrectf.html#x">x</a>().</p>
<p>See also <a href="qrectf.html#setLeft">setLeft</a>(), <a href="qrectf.html#topLeft">topLeft</a>(), and <a href="qrectf.html#bottomLeft">bottomLeft</a>().</p>
<h3 class="fn"><a name="moveBottom"></a>void QRectF::moveBottom ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i> )</h3>
<p>Moves the rectangle vertically, leaving the rectangle's bottom edge at the given <i>y</i> coordinate. The rectangle's size is unchanged.</p>
<p>See also <a href="qrectf.html#bottom">bottom</a>(), <a href="qrectf.html#setBottom">setBottom</a>(), and <a href="qrectf.html#moveTop">moveTop</a>().</p>
<h3 class="fn"><a name="moveBottomLeft"></a>void QRectF::moveBottomLeft ( const <a href="qpointf.html">QPointF</a> &amp; <i>position</i> )</h3>
<p>Moves the rectangle, leaving the bottom-left corner at the given <i>position</i>. The rectangle's size is unchanged.</p>
<p>See also <a href="qrectf.html#setBottomLeft">setBottomLeft</a>(), <a href="qrectf.html#moveBottom">moveBottom</a>(), and <a href="qrectf.html#moveLeft">moveLeft</a>().</p>
<h3 class="fn"><a name="moveBottomRight"></a>void QRectF::moveBottomRight ( const <a href="qpointf.html">QPointF</a> &amp; <i>position</i> )</h3>
<p>Moves the rectangle, leaving the bottom-right corner at the given <i>position</i>. The rectangle's size is unchanged.</p>
<p>See also <a href="qrectf.html#setBottomRight">setBottomRight</a>(), <a href="qrectf.html#moveBottom">moveBottom</a>(), and <a href="qrectf.html#moveRight">moveRight</a>().</p>
<h3 class="fn"><a name="moveCenter"></a>void QRectF::moveCenter ( const <a href="qpointf.html">QPointF</a> &amp; <i>position</i> )</h3>
<p>Moves the rectangle, leaving the center point at the given <i>position</i>. The rectangle's size is unchanged.</p>
<p>See also <a href="qrectf.html#center">center</a>().</p>
<h3 class="fn"><a name="moveLeft"></a>void QRectF::moveLeft ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i> )</h3>
<p>Moves the rectangle horizontally, leaving the rectangle's left edge at the given <i>x</i> coordinate. The rectangle's size is unchanged.</p>
<p>See also <a href="qrectf.html#left">left</a>(), <a href="qrectf.html#setLeft">setLeft</a>(), and <a href="qrectf.html#moveRight">moveRight</a>().</p>
<h3 class="fn"><a name="moveRight"></a>void QRectF::moveRight ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i> )</h3>
<p>Moves the rectangle horizontally, leaving the rectangle's right edge at the given <i>x</i> coordinate. The rectangle's size is unchanged.</p>
<p>See also <a href="qrectf.html#right">right</a>(), <a href="qrectf.html#setRight">setRight</a>(), and <a href="qrectf.html#moveLeft">moveLeft</a>().</p>
<h3 class="fn"><a name="moveTo"></a>void QRectF::moveTo ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i> )</h3>
<p>Moves the rectangle, leaving the top-left corner at the given position (<i>x</i>, <i>y</i>). The rectangle's size is unchanged.</p>
<p>See also <a href="qrectf.html#translate">translate</a>() and <a href="qrectf.html#moveTopLeft">moveTopLeft</a>().</p>
<h3 class="fn"><a name="moveTo-2"></a>void QRectF::moveTo ( const <a href="qpointf.html">QPointF</a> &amp; <i>position</i> )</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>Moves the rectangle, leaving the top-left corner at the given <i>position</i>.</p>
<h3 class="fn"><a name="moveTop"></a>void QRectF::moveTop ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i> )</h3>
<p>Moves the rectangle vertically, leaving the rectangle's top line at the given <i>y</i> coordinate. The rectangle's size is unchanged.</p>
<p>See also <a href="qrectf.html#top">top</a>(), <a href="qrectf.html#setTop">setTop</a>(), and <a href="qrectf.html#moveBottom">moveBottom</a>().</p>
<h3 class="fn"><a name="moveTopLeft"></a>void QRectF::moveTopLeft ( const <a href="qpointf.html">QPointF</a> &amp; <i>position</i> )</h3>
<p>Moves the rectangle, leaving the top-left corner at the given <i>position</i>. The rectangle's size is unchanged.</p>
<p>See also <a href="qrectf.html#setTopLeft">setTopLeft</a>(), <a href="qrectf.html#moveTop">moveTop</a>(), and <a href="qrectf.html#moveLeft">moveLeft</a>().</p>
<h3 class="fn"><a name="moveTopRight"></a>void QRectF::moveTopRight ( const <a href="qpointf.html">QPointF</a> &amp; <i>position</i> )</h3>
<p>Moves the rectangle, leaving the top-right corner at the given <i>position</i>. The rectangle's size is unchanged.</p>
<p>See also <a href="qrectf.html#setTopRight">setTopRight</a>(), <a href="qrectf.html#moveTop">moveTop</a>(), and <a href="qrectf.html#moveRight">moveRight</a>().</p>
<h3 class="fn"><a name="normalized"></a>QRectF QRectF::normalized () const</h3>
<p>Returns a normalized rectangle; i.e&#x2e;, a rectangle that has a non-negative width and height.</p>
<p>If <a href="qrectf.html#width">width</a>() &lt; 0 the function swaps the left and right corners, and it swaps the top and bottom corners if <a href="qrectf.html#height">height</a>() &lt; 0.</p>
<p>See also <a href="qrectf.html#isValid">isValid</a>() and <a href="qrectf.html#isEmpty">isEmpty</a>().</p>
<h3 class="fn"><a name="right"></a><a href="qtglobal.html#qreal-typedef">qreal</a> QRectF::right () const</h3>
<p>Returns the x-coordinate of the rectangle's right edge.</p>
<p>See also <a href="qrectf.html#setRight">setRight</a>(), <a href="qrectf.html#topRight">topRight</a>(), and <a href="qrectf.html#bottomRight">bottomRight</a>().</p>
<h3 class="fn"><a name="setBottom"></a>void QRectF::setBottom ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i> )</h3>
<p>Sets the bottom edge of the rectangle to the given <i>y</i> coordinate. May change the height, but will never change the top edge of the rectangle.</p>
<p>See also <a href="qrectf.html#bottom">bottom</a>() and <a href="qrectf.html#moveBottom">moveBottom</a>().</p>
<h3 class="fn"><a name="setBottomLeft"></a>void QRectF::setBottomLeft ( const <a href="qpointf.html">QPointF</a> &amp; <i>position</i> )</h3>
<p>Set the bottom-left corner of the rectangle to the given <i>position</i>. May change the size, but will the never change the top-right corner of the rectangle.</p>
<p>See also <a href="qrectf.html#bottomLeft">bottomLeft</a>() and <a href="qrectf.html#moveBottomLeft">moveBottomLeft</a>().</p>
<h3 class="fn"><a name="setBottomRight"></a>void QRectF::setBottomRight ( const <a href="qpointf.html">QPointF</a> &amp; <i>position</i> )</h3>
<p>Set the top-right corner of the rectangle to the given <i>position</i>. May change the size, but will the never change the top-left corner of the rectangle.</p>
<p>See also <a href="qrectf.html#bottomRight">bottomRight</a>() and <a href="qrectf.html#moveBottomRight">moveBottomRight</a>().</p>
<h3 class="fn"><a name="setCoords"></a>void QRectF::setCoords ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x1</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y1</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x2</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y2</i> )</h3>
<p>Sets the coordinates of the rectangle's top-left corner to (<i>x1</i>, <i>y1</i>), and the coordinates of its bottom-right corner to (<i>x2</i>, <i>y2</i>).</p>
<p>See also <a href="qrectf.html#getCoords">getCoords</a>() and <a href="qrectf.html#setRect">setRect</a>().</p>
<h3 class="fn"><a name="setHeight"></a>void QRectF::setHeight ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>height</i> )</h3>
<p>Sets the height of the rectangle to the given <i>height</i>. The bottom edge is changed, but not the top one.</p>
<p>See also <a href="qrectf.html#height">height</a>() and <a href="qrectf.html#setSize">setSize</a>().</p>
<h3 class="fn"><a name="setLeft"></a>void QRectF::setLeft ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i> )</h3>
<p>Sets the left edge of the rectangle to the given <i>x</i> coordinate. May change the width, but will never change the right edge of the rectangle.</p>
<p>Equivalent to <a href="qrectf.html#setX">setX</a>().</p>
<p>See also <a href="qrectf.html#left">left</a>() and <a href="qrectf.html#moveLeft">moveLeft</a>().</p>
<h3 class="fn"><a name="setRect"></a>void QRectF::setRect ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>width</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>height</i> )</h3>
<p>Sets the coordinates of the rectangle's top-left corner to (<i>x</i>, <i>y</i>), and its size to the given <i>width</i> and <i>height</i>.</p>
<p>See also <a href="qrectf.html#getRect">getRect</a>() and <a href="qrectf.html#setCoords">setCoords</a>().</p>
<h3 class="fn"><a name="setRight"></a>void QRectF::setRight ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i> )</h3>
<p>Sets the right edge of the rectangle to the given <i>x</i> coordinate. May change the width, but will never change the left edge of the rectangle.</p>
<p>See also <a href="qrectf.html#right">right</a>() and <a href="qrectf.html#moveRight">moveRight</a>().</p>
<h3 class="fn"><a name="setSize"></a>void QRectF::setSize ( const <a href="qsizef.html">QSizeF</a> &amp; <i>size</i> )</h3>
<p>Sets the size of the rectangle to the given <i>size</i>. The top-left corner is not moved.</p>
<p>See also <a href="qrectf.html#size">size</a>(), <a href="qrectf.html#setWidth">setWidth</a>(), and <a href="qrectf.html#setHeight">setHeight</a>().</p>
<h3 class="fn"><a name="setTop"></a>void QRectF::setTop ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i> )</h3>
<p>Sets the top edge of the rectangle to the given <i>y</i> coordinate. May change the height, but will never change the bottom edge of the rectangle.</p>
<p>Equivalent to <a href="qrectf.html#setY">setY</a>().</p>
<p>See also <a href="qrectf.html#top">top</a>() and <a href="qrectf.html#moveTop">moveTop</a>().</p>
<h3 class="fn"><a name="setTopLeft"></a>void QRectF::setTopLeft ( const <a href="qpointf.html">QPointF</a> &amp; <i>position</i> )</h3>
<p>Set the top-left corner of the rectangle to the given <i>position</i>. May change the size, but will the never change the bottom-right corner of the rectangle.</p>
<p>See also <a href="qrectf.html#topLeft">topLeft</a>() and <a href="qrectf.html#moveTopLeft">moveTopLeft</a>().</p>
<h3 class="fn"><a name="setTopRight"></a>void QRectF::setTopRight ( const <a href="qpointf.html">QPointF</a> &amp; <i>position</i> )</h3>
<p>Set the top-right corner of the rectangle to the given <i>position</i>. May change the size, but will the never change the bottom-left corner of the rectangle.</p>
<p>See also <a href="qrectf.html#topRight">topRight</a>() and <a href="qrectf.html#moveTopRight">moveTopRight</a>().</p>
<h3 class="fn"><a name="setWidth"></a>void QRectF::setWidth ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>width</i> )</h3>
<p>Sets the width of the rectangle to the given <i>width</i>. The right edge is changed, but not the left one.</p>
<p>See also <a href="qrectf.html#width">width</a>() and <a href="qrectf.html#setSize">setSize</a>().</p>
<h3 class="fn"><a name="setX"></a>void QRectF::setX ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i> )</h3>
<p>Sets the left edge of the rectangle to the given <i>x</i> coordinate. May change the width, but will never change the right edge of the rectangle.</p>
<p>Equivalent to <a href="qrectf.html#setLeft">setLeft</a>().</p>
<p>See also <a href="qrectf.html#x">x</a>(), <a href="qrectf.html#setY">setY</a>(), and <a href="qrectf.html#setTopLeft">setTopLeft</a>().</p>
<h3 class="fn"><a name="setY"></a>void QRectF::setY ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i> )</h3>
<p>Sets the top edge of the rectangle to the given <i>y</i> coordinate. May change the height, but will never change the bottom edge of the rectangle.</p>
<p>Equivalent to <a href="qrectf.html#setTop">setTop</a>().</p>
<p>See also <a href="qrectf.html#y">y</a>(), <a href="qrectf.html#setX">setX</a>(), and <a href="qrectf.html#setTopLeft">setTopLeft</a>().</p>
<h3 class="fn"><a name="size"></a><a href="qsizef.html">QSizeF</a> QRectF::size () const</h3>
<p>Returns the size of the rectangle.</p>
<p>See also <a href="qrectf.html#setSize">setSize</a>(), <a href="qrectf.html#width">width</a>(), and <a href="qrectf.html#height">height</a>().</p>
<h3 class="fn"><a name="toAlignedRect"></a><a href="qrect.html">QRect</a> QRectF::toAlignedRect () const</h3>
<p>Returns a <a href="qrect.html">QRect</a> based on the values of this rectangle that is the smallest possible integer rectangle that completely contains this rectangle.</p>
<p>This function was introduced in Qt 4.3.</p>
<p>See also <a href="qrectf.html#toRect">toRect</a>().</p>
<h3 class="fn"><a name="toRect"></a><a href="qrect.html">QRect</a> QRectF::toRect () const</h3>
<p>Returns a <a href="qrect.html">QRect</a> based on the values of this rectangle. Note that the coordinates in the returned rectangle are rounded to the nearest integer.</p>
<p>See also <a href="qrectf.html#QRectF">QRectF</a>() and <a href="qrectf.html#toAlignedRect">toAlignedRect</a>().</p>
<h3 class="fn"><a name="top"></a><a href="qtglobal.html#qreal-typedef">qreal</a> QRectF::top () const</h3>
<p>Returns the y-coordinate of the rectangle's top edge. Equivalent to <a href="qrectf.html#y">y</a>().</p>
<p>See also <a href="qrectf.html#setTop">setTop</a>(), <a href="qrectf.html#topLeft">topLeft</a>(), and <a href="qrectf.html#topRight">topRight</a>().</p>
<h3 class="fn"><a name="topLeft"></a><a href="qpointf.html">QPointF</a> QRectF::topLeft () const</h3>
<p>Returns the position of the rectangle's top-left corner.</p>
<p>See also <a href="qrectf.html#setTopLeft">setTopLeft</a>(), <a href="qrectf.html#top">top</a>(), and <a href="qrectf.html#left">left</a>().</p>
<h3 class="fn"><a name="topRight"></a><a href="qpointf.html">QPointF</a> QRectF::topRight () const</h3>
<p>Returns the position of the rectangle's top-right corner.</p>
<p>See also <a href="qrectf.html#setTopRight">setTopRight</a>(), <a href="qrectf.html#top">top</a>(), and <a href="qrectf.html#right">right</a>().</p>
<h3 class="fn"><a name="translate"></a>void QRectF::translate ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>dx</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>dy</i> )</h3>
<p>Moves the rectangle <i>dx</i> along the x-axis and <i>dy</i> along the y-axis, relative to the current position. Positive values move the rectangle to the right and downwards.</p>
<p>See also <a href="qrectf.html#moveTopLeft">moveTopLeft</a>(), <a href="qrectf.html#moveTo">moveTo</a>(), and <a href="qrectf.html#translated">translated</a>().</p>
<h3 class="fn"><a name="translate-2"></a>void QRectF::translate ( const <a href="qpointf.html">QPointF</a> &amp; <i>offset</i> )</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>Moves the rectangle <i>offset</i>.<a href="qpointf.html#x">x()</a> along the x axis and <i>offset</i>.<a href="qpointf.html#y">y()</a> along the y axis, relative to the current position.</p>
<h3 class="fn"><a name="translated"></a>QRectF QRectF::translated ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>dx</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>dy</i> ) const</h3>
<p>Returns a copy of the rectangle that is translated <i>dx</i> along the x axis and <i>dy</i> along the y axis, relative to the current position. Positive values move the rectangle to the right and down.</p>
<p>See also <a href="qrectf.html#translate">translate</a>().</p>
<h3 class="fn"><a name="translated-2"></a>QRectF QRectF::translated ( const <a href="qpointf.html">QPointF</a> &amp; <i>offset</i> ) const</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>Returns a copy of the rectangle that is translated <i>offset</i>.<a href="qpointf.html#x">x()</a> along the x axis and <i>offset</i>.<a href="qpointf.html#y">y()</a> along the y axis, relative to the current position.</p>
<h3 class="fn"><a name="united"></a>QRectF QRectF::united ( const QRectF &amp; <i>rectangle</i> ) const</h3>
<p>Returns the bounding rectangle of this rectangle and the given <i>rectangle</i>.</p>
<p align="center"><img src="images/qrect-unite.png" /></p><p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qrectf.html#intersected">intersected</a>().</p>
<h3 class="fn"><a name="width"></a><a href="qtglobal.html#qreal-typedef">qreal</a> QRectF::width () const</h3>
<p>Returns the width of the rectangle.</p>
<p>See also <a href="qrectf.html#setWidth">setWidth</a>(), <a href="qrectf.html#height">height</a>(), and <a href="qrectf.html#size">size</a>().</p>
<h3 class="fn"><a name="x"></a><a href="qtglobal.html#qreal-typedef">qreal</a> QRectF::x () const</h3>
<p>Returns the x-coordinate of the rectangle's left edge. Equivalent to <a href="qrectf.html#left">left</a>().</p>
<p>See also <a href="qrectf.html#setX">setX</a>(), <a href="qrectf.html#y">y</a>(), and <a href="qrectf.html#topLeft">topLeft</a>().</p>
<h3 class="fn"><a name="y"></a><a href="qtglobal.html#qreal-typedef">qreal</a> QRectF::y () const</h3>
<p>Returns the y-coordinate of the rectangle's top edge. Equivalent to <a href="qrectf.html#top">top</a>().</p>
<p>See also <a href="qrectf.html#setY">setY</a>(), <a href="qrectf.html#x">x</a>(), and <a href="qrectf.html#topLeft">topLeft</a>().</p>
<h3 class="fn"><a name="operator-and"></a>QRectF QRectF::operator&amp; ( const QRectF &amp; <i>rectangle</i> ) const</h3>
<p>Returns the intersection of this rectangle and the given <i>rectangle</i>. Returns an empty rectangle if there is no intersection.</p>
<p>See also <a href="qrectf.html#operator-and-eq">operator&amp;=</a>() and <a href="qrectf.html#intersected">intersected</a>().</p>
<h3 class="fn"><a name="operator-and-eq"></a>QRectF &amp; QRectF::operator&amp;= ( const QRectF &amp; <i>rectangle</i> )</h3>
<p>Intersects this rectangle with the given <i>rectangle</i>.</p>
<p>See also <a href="qrectf.html#intersected">intersected</a>() and <a href="qrectf.html#operator-7c-eq">operator|=</a>().</p>
<h3 class="fn"><a name="operator-7c"></a>QRectF QRectF::operator| ( const QRectF &amp; <i>rectangle</i> ) const</h3>
<p>Returns the bounding rectangle of this rectangle and the given <i>rectangle</i>.</p>
<p>See also <a href="qrectf.html#united">united</a>() and <a href="qrectf.html#operator-7c-eq">operator|=</a>().</p>
<h3 class="fn"><a name="operator-7c-eq"></a>QRectF &amp; QRectF::operator|= ( const QRectF &amp; <i>rectangle</i> )</h3>
<p>Unites this rectangle with the given <i>rectangle</i>.</p>
<p>See also <a href="qrectf.html#united">united</a>() and <a href="qrectf.html#operator-7c">operator|</a>().</p>
<hr />
<h2>Related Non-Members</h2>
<h3 class="fn"><a name="operator-not-eq-17"></a>Q_CORE_EXPORT_INLINE operator!= ( const QRectF &amp; <i>r1</i>, const QRectF &amp; <i>r2</i> )</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>Returns true if the rectangles <i>r1</i> and <i>r2</i> are different, otherwise returns false.</p>
<h3 class="fn"><a name="operator-lt-lt-49"></a><a href="qdatastream.html">QDataStream</a> &amp; operator&lt;&lt; ( <a href="qdatastream.html">QDataStream</a> &amp; <i>stream</i>, const QRectF &amp; <i>rectangle</i> )</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>Writes the <i>rectangle</i> to the <i>stream</i>, and returns a reference to the stream.</p>
<p>See also <a href="datastreamformat.html">Format of the QDataStream operators</a>.</p>
<h3 class="fn"><a name="operator-eq-eq-26"></a>Q_CORE_EXPORT_INLINE operator== ( const QRectF &amp; <i>r1</i>, const QRectF &amp; <i>r2</i> )</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>Returns true if the rectangles <i>r1</i> and <i>r2</i> are equal, otherwise returns false.</p>
<h3 class="fn"><a name="operator-gt-gt-29"></a><a href="qdatastream.html">QDataStream</a> &amp; operator&gt;&gt; ( <a href="qdatastream.html">QDataStream</a> &amp; <i>stream</i>, QRectF &amp; <i>rectangle</i> )</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>Reads a <i>rectangle</i> from the <i>stream</i>, and returns a reference to the stream.</p>
<p>See also <a href="datastreamformat.html">Format of the QDataStream operators</a>.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright &copy; 2008 <a href="trolltech.html">Trolltech</a></td>
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt 4.3.5</div></td>
</tr></table></div></address></body>
</html>
